package com.qf.question01.dao;


import com.qf.question01.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {
    /**
     * 根据用户名查询用户
     * @param username
     * @return
     */
    User getUserByName(@Param("username") String username);

    void insertByUser(User user);

    User getUserBYNameAndPassword(@Param("name") String name,@Param("password") String password);

    List<User> getAllUsersByCondition(User userCondition);

    void deleteUserByIds(@Param("ids") String[] ids);

    User getUserById(@Param("id") Integer id);

    void updateUserById(User user);

    List<User> getAllUsers();
}
